﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>typeof运算符</title>
</head>
<body>
    <script language="javascript">
        let x = 3;
        let y = null;
        let sex = "boy";
        document.write("<p>执行语句“typeof x”后，可以看出变量x类型为：" + (typeof x));
        document.write("<p>执行语句“typeof y”后，可以看出变量y类型为：" + (typeof y));
        document.write("<p>执行语句“typeof sex”后，可以看出变量sex类型为：" + (typeof sex)); 
    </script>
</body>
</html>